package com.group.service;

import org.springframework.web.client.RestTemplate;
import pojo.entity.Address;
import pojo.qo.AddressState;

import java.util.List;

public interface AddressService {

    //增加地址
    public int addAddress(Address address);

    //删除地址
    public int deleteByAddressId(Long addressId);

   /* //修改地址
    public void updateAddress(Address address);*/

    //根据用户名查询他的所有地址
    public List<Address> queryByUserIdGetAllAddress(Long userId);

    //根据用户id查询此用户的默认地址
    public Address queryByUserIdForDefault(Long userId);

    //根据地址id查询地址信息
    public Address queryByAddressId(Long addressId);

    //设为当前地址为默认地址且当前useid的其他地址为非默认地址
    public void addressToDefault(AddressState address);


}
